From 7d103c7505267e0a89f1bf8be8e3cd9c49afaf7e Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sat, 28 May 2005 09:23:56 +0000 Subject: [PATCH] bitkeeper revision 1.1582 (429838acDJZ12SHZ0oEfuJwBD4FoqQ) Make cpuid() less fussy about the type of its pointer parameters. This fixes the build with gcc4. Signed-off-by: Keir Fraser --- xen/include/asm-x86/processor.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h index 6fc44ade5d..e054eb22b0 100644 --- a/xen/include/asm-x86/processor.h +++ b/xen/include/asm-x86/processor.h @@ -199,17 +199,13 @@ static inline void detect_ht(struct cpuinfo_x86 *c) {} * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx * resulting in stale register contents being returned. */ -static inline void cpuid( - int op, unsigned int *eax, unsigned int *ebx, - unsigned int *ecx, unsigned int *edx) -{ - __asm__("cpuid" - : "=a" (*eax), - "=b" (*ebx), - "=c" (*ecx), - "=d" (*edx) - : "0" (op), "2" (0)); -} +#define cpuid(_op,_eax,_ebx,_ecx,_edx) \ + __asm__("cpuid" \ + : "=a" (*(int *)(_eax)), \ + "=b" (*(int *)(_ebx)), \ + "=c" (*(int *)(_ecx)), \ + "=d" (*(int *)(_edx)) \ + : "0" (_op), "2" (0)) /* * CPUID functions returning a single datum -- 2.30.2